package com.huadao.cart_ccs.experiment.home;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

import com.huadao.cart_ccs.R;
import com.huadao.cart_ccs.base.BaseDialogFragment;
import com.huadao.cart_ccs.base.BasePresenter;

import butterknife.BindView;
import butterknife.OnClick;

public class PumpOperateDF extends BaseDialogFragment {
    @BindView(R.id.et_speed)
    EditText etSpeed;
    @BindView(R.id.sp_direction)
    Spinner spDirection;
    @BindView(R.id.btn_close)
    Button btnClose;
    @BindView(R.id.btn_open)
    Button btnOpen;

    private PumpOperate pumpOperate;
    public interface PumpOperate{
        void onPumpOpen(byte ModularNO,int speed,byte direction);
        void onPumpClose(byte ModularNO);
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_pump_operate;
    }

    @Override
    protected void onInit() {

    }

    @Override
    protected boolean isDialog() {
        return true;
    }

    @OnClick({R.id.btn_close, R.id.btn_open})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_close:
                if(pumpOperate!=null){

                }
                break;
            case R.id.btn_open:
                if(pumpOperate!=null){

                }
                break;
        }
    }
}
